﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="../Resources.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    <Style x:Key="StandardButton" TargetType="Button">
        <Setter Property="Visibility" Value="Visible"/>
        <Setter Property="Foreground" Value="{StaticResource Foreground}"/>
        <Setter Property="Background" Value="{StaticResource BackgroundNormal}"/>
        <Setter Property="BorderBrush" Value="{StaticResource BorderBrushNormal}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border SnapsToDevicePixels="True"
				            BorderThickness="1"
				            BorderBrush="{TemplateBinding BorderBrush}" 
				            Background="{TemplateBinding Background}">
                        <Grid SnapsToDevicePixels="True">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="BorderBrush" Value="{StaticResource BorderBrushHighlighted}" />
                            <Setter Property="Background" Value="{StaticResource BackgroundHighlighted}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" Value="{StaticResource BackgroundSelected}"/>
                            <Setter Property="BorderBrush" Value="{StaticResource BorderBrushSelected}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value=".5"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="LinkButton" TargetType="Button">
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Foreground" Value="{StaticResource LinkButtonForeground}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <TextBlock><ContentPresenter/></TextBlock>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Foreground" Value="{StaticResource LinkButtonForegroundHighlighted}" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>